package com.tuanzi.loan.security;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.*;

import org.hibernate.envers.RevisionEntity;
import org.hibernate.envers.RevisionNumber;
import org.hibernate.envers.RevisionTimestamp;

import lombok.Data;

/**
 * @author Ray 2017/09/21
 */
@Data
@Entity
@Table(name = "TB_LOAN_REVISION")
@RevisionEntity(LoanRevisionListener.class)
public class LoanRevision implements Serializable {

    private static final long serialVersionUID = 7550766086746707203L;

    @Id
    @GeneratedValue
    @RevisionNumber
    @Column(name = "ID")
    private Long id;

    @RevisionTimestamp
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "TIMESTAMP")
    private Date timestamp;

    @Column(name = "OPERATOR")
    private String operator;

}
